import socket
import time


PORT =8000


server_socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
address = ('10.0.0.239',PORT)
server_socket.bind(address)
server_socket.settimeout(10)

while True:
    try:
        now =time.time()

        receive_data, client = server_socket.recvfrom(1024)
        # print(time.strptime('%Y-%m-%d %H:%M:%s',time.localtime(now)))
        print(receive_data)
    except socket.timeout:
        print('time out')
